package com.htjx.mall.commons.utils.page;

import java.util.List;

/**
 * 
 * @author jingrenlang
 * 
 */
public class TinyPage<T> {

	private int totalCount;
	private List<T> result;
	private int pageSize = 10;
	private int pageNo = 1;

	public TinyPage(int pageSize, int pageNo) {
		this.pageSize = pageSize;
		this.pageNo = pageNo;
		if (this.pageNo <= 0) {
			this.pageNo = 1;
		}
	}

	public int pageSize() {
		return pageSize;
	}

	public int pageNo() {
		return pageNo;
	}

	public int offset() {
		return (pageNo - 1) * pageSize;
	}

	public int len() {
		return pageSize;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public List<T> getResult() {
		return result;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public void setResult(List<T> result) {
		this.result = result;
	}

}
